//
//  YZLCarButtonCollectionViewCell.m
//  Car
//
//  Created by dllo on 15/11/2.
//  Copyright © 2015年 岳明. All rights reserved.
//

#import "YZLCarButtonCollectionViewCell.h"

@interface YZLCarButtonCollectionViewCell ()

@property (nonatomic, strong) UIImageView *carimage;
@property (nonatomic, strong) UILabel *carLabel;

@end

@implementation YZLCarButtonCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        self.carimage = [[UIImageView alloc] init];
        self.carimage.image = [UIImage imageNamed:@"更多"];
        [self.contentView addSubview:self.carimage];
        
        self.carLabel = [[UILabel alloc] init];
        self.carLabel.text = @"更多图片";
        self.carLabel.textColor = [UIColor colorWithWhite:0.2 alpha:1.000];
        self.carLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:self.carLabel];
        
    }
    
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    
    self.carimage.frame = CGRectMake((self.contentView.frame.size.width - 40) / 2.f, 20, 40, 30);
    self.carLabel.frame = CGRectMake((self.contentView.frame.size.width - 60) / 2.f, 50, 60, 20);
    self.contentView.backgroundColor = [UIColor colorWithWhite:0.950 alpha:1.000];
}




@end
